#include "RankTwoTensor.h"

#include "FreeAnisoHeatConductionKernel.h"
#include "MooseMesh.h"
registerMooseObject("RoshanApp", FreeAnisoHeatConductionKernel);
template<>
InputParameters validParams<FreeAnisoHeatConductionKernel>()
{
  InputParameters params = validParams<Kernel>();
  params.set<bool>("use_displaced_mesh") = true;
  return params;
}

FreeAnisoHeatConductionKernel::FreeAnisoHeatConductionKernel(const InputParameters & parameters) :
  Kernel(parameters),
 _conductivity_matrix_xyz(getMaterialProperty<RankTwoTensor>("thermal_conductivity_xyz"))
{

}

Real
FreeAnisoHeatConductionKernel::computeQpResidual()
{
  Real r(0);
    r =  _conductivity_matrix_xyz[_qp] * _grad_u[_qp]* _grad_test[_i][_qp];
  return r;
}

Real
FreeAnisoHeatConductionKernel::computeQpJacobian()
{
  Real jac(0);
  jac = _conductivity_matrix_xyz[_qp]*_grad_phi[_j][_qp] * _grad_test[_i][_qp];
  return jac;
}

